package com.fx.controller;

import com.fx.demo.common.resulUtils.AjaxResult;
import com.fx.feign.FeignProviderClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("feign")
public class FeignProviderController {

    @Autowired
    private FeignProviderClient feignProviderClient;

    @GetMapping("students")
    public AjaxResult students(){
        return feignProviderClient.findAll(0,10);
    }
    @GetMapping("getport")
    public String getport(){
        return feignProviderClient.getPort();
    }
}
